<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<ww:bean name="'com.css.apps.base.dict.service.DictMan'" id="dictID" />
<ww:bean name="'com.css.msgcenter.admin.msgapp.service.MsgAppService'" id="msgAppService" />
<form class="form-horizontal table-form" name="form1" id="form1" method="post" action="dirMsgApp.action"  onsubmit="return $action.query(this)">
    <input type="hidden" name="page.orderFlag" id="page.orderFlag" class="order-flag" value="<ww:property value='page.orderFlag'/>"> 
	<input type="hidden" name="page.orderString" id="page.orderString" class="order-string" value="<ww:property value='page.orderString'/>">
	<input type="hidden" name="page.pageSize" class="page-size" value="<ww:property value='page.pageSize'/>">
	<input type="hidden" name="page.totalPages" class="page-count" value="<ww:property value='page.totalPages'/>">
	<input type="hidden" name="page.currentPage" class="page-current" value="<ww:property value='page.currentPage'/>">
	<input type="hidden" name="uuid" value="<ww:property value='uuid'/>">
	
	<div class="table-header">
		<div class="table-search">
			<ul>
				<li><input class="input-medium" type="text" id="appCode" name="appCode" maxlength="50"  placeholder="请输入应用标识" value="<ww:property value='appCode'/>"></li>
				<li><input class="input-medium" type="text" id="appName" name="appName" maxlength="50"  placeholder="请输入应用名称" value="<ww:property value='appName'/>"></li>
			    <li>开启状态：<ww:select attributes="class='input-small'" name="'openFlag'" id="openFlag" value="openFlag"  list="#dictID.getDictListQuery('d_openflag')" listKey="code" listValue="name"></ww:select> </li>
			    <li><ww:button css="btn green" caption="查询" funcode="msgcenter_msgapp/dirMsgApp" type="submit"></ww:button></li>
			</ul>
		</div>
		<div class="table-btn">
			<div class="btn-group">
				<ww:link funcode="msgcenter_msgapp/getMsgApp" css="btn" caption="添加" title="添加第三方应用" target="cssTab" rel="getMsgApp" href="getMsgApp.action" ></ww:link>
			</div>
			<div class="btn-group">
				<ww:link funcode="msgcenter_msgapp/delMsgApp" css="btn" caption="批量删除"
					onclick="$action.execBatch(this,{url:'delMsgApp.action',title:'将删除应用配置，确认删除?'});"></ww:link>
			</div>
			<div class="btn-group">
			    <ww:dropdown funcode="msgcenter_msgapp/updMsgApp" value="model" list="#dictID.getDictType('d_openflag')" listKey="name" caption="设置状态" 
			    	onclick="$action.execBatch(this,{url:'updMsgApp.action?openStatus=%{#model.code}',title:'将更改应用状态,确认更改?'});" />  
		    </div>
		</div>
	</div>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th width="25px"><input group="ids" class="cleck-all" type="checkbox"/></th>
				<th width="80px">操作</th>
				<th width="" order-field="a.appCode" class="order">应用标识</th>
				<th width="" order-field="a.appName" class="order">应用名称</th>
				<th width="" order-field="a.checkMsgType" class="order">允许消息类型</th>
				<th width="50px" order-field="a.openFlag" class="order">开启状态</th>
				<th width="50px" order-field="a.checkIp" class="order">是否检验IP</th>
				<th width="110px" order-field="a.createdTime" class="order">创建时间</th>
			</tr>
		</thead>
		<tbody>
		  <ww:iterator value="page.results" id="data" status="data">
			<tr>
				<td class="text-center"><input type="checkbox"  name="ids" id="ids" value="<ww:property value="uuid" />"/></td>
				<td class="text-center">
					<ww:link funcode="msgcenter_msgapp/getMsgApp" caption="修改"  title="修改%{appCode}应用信息"  target="cssTab" rel="getMsgApp%{uuid}" href="getMsgApp.action?uuid=%{uuid}" ></ww:link>&nbsp;
					<ww:link funcode="msgcenter_msgapp/delMsgApp" caption="删除"
						onclick="$action.exec(this,{url:'delMsgApp.action?ids=%{uuid}',title:'将删除该应用配置，确认删除?'})" href="javascript:;"></ww:link>&nbsp;
				</td>
				<td class="text-center"><ww:property value="appCode"/></td>
				<td class="text-center"><ww:property value="appName"/></td>
				<td class="text-center"><ww:property value="#msgAppService.getMsgTypes(checkMsgType)"/></td>
				<td class="text-center"><ww:property value="#dictID.getDictType('d_openflag',openFlag).name" /></td>
				<td class="text-center"><ww:property value="#dictID.getDictType('d_truefalse',checkIp).name" /></td>
				<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yy-MM-dd HH:mm').format(createdTime)"/></td>
			</tr>
			</ww:iterator>
		</tbody>
	</table>
	<div class="pagination"> <ww:property value="page.pageSplit"/></div>
</form>

